// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** createComment POST /api/comments */
export async function createCommentUsingPost(
  body: API.CommentAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/comments', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** deleteComment POST /api/comments/delete */
export async function deleteCommentUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteCommentUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/comments/delete', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** getRootComments GET /api/comments/picture */
export async function getRootCommentsUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getRootCommentsUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListCommentVO_>('/api/comments/picture', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** searchComments GET /api/comments/search */
export async function searchCommentsUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.searchCommentsUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListComment_>('/api/comments/search', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}
